package work.timejay.user.entity.books;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import work.timejay.common.SuperModel;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 书本表
 * </p>
 *
 * @author 王文杰
 * @since 2023-11-28
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("books")
public class Books extends SuperModel<Books> {

    private static final long serialVersionUID = 1L;

    /**
     * 标题
     */
    @TableField("title")
    private String title;

    /**
     * 书本描述
     */
    @TableField("book_desc")
    private String bookDesc;

    /**
     * 作者
     */
    @TableField("author")
    private String author;

    /**
     * 书本文件路径
     */
    @TableField("book_path")
    private String bookPath;

    /**
     * 书本类型
     */
    @TableField("type")
    private Long type;

    /**
     * 封面图片
     */
    @TableField("cover_path")
    private String coverPath;

    /**
     * 价格
     */
    @TableField("price")
    private String price;

    /**
     * 0 不收费 1 收费
     */
    @TableField("price_status")
    private Boolean priceStatus;

    /**
     * 1 正常 0 下线
     */
    @TableField("status")
    private Boolean status;

    /**
     * 排序字段
     */
    @TableField("order_num")
    private Long orderNum;

    /**
     * 点赞数
     */
    @TableField("give_num")
    private Long giveNum;

    /**
     * 收藏数
     */
    @TableField("like_num")
    private Long likeNum;

    /**
     * 购买数
     */
    @TableField("pay_num")
    private Long payNum;


    /**
     * 书本来源
     */
    @TableField("source_link")
    private String sourceLink;

    /**
     * 是否处理
     */
    @TableField("handler_status")
    private Boolean handlerStatus;

    public static final String TITLE = "title";

    public static final String AUTHOR = "author";

    public static final String BOOK_PATH = "book_path";

    public static final String COVER_PATH = "cover_path";

    public static final String PRICE = "price";

    public static final String PRICE_STATUS = "price_status";

    public static final String STATUS = "status";

    public static final String ORDER_NUM = "order_num";

    public static final String GIVE_NUM = "give_num";

    public static final String LIKE_NUM = "like_num";

    public static final String PAY_NUM = "pay_num";

    @Override
    protected Serializable pkVal() {
        return null;
    }

}
